//
//  KnowBottomView.m
//  liangyi
//
//  Created by 张水 on 17/2/20.
//  Copyright © 2017年 yswh. All rights reserved.
//

#import "KnowBottomView.h"

@interface KnowBottomView ()

@end

@implementation KnowBottomView

-(instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self){
        [self setup];
    }
    return  self;
}
    
-(void)setup{
    
    UIView *topLine = [[UIView alloc]init];
    topLine.backgroundColor = [UIColor grayColor];
    [self addSubview:topLine];
    [topLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self);
        make.left.right.equalTo(self);
        make.height.equalTo(@0.5);
    
    }];
    self.backgroundColor = [UIColor whiteColor];
    self.ForwardBtn = [[UIButton alloc]initWithFrame:CGRectMake(0, 0.5, kScreenWidth/3 - 1, self.size.height)];
    self.ForwardBtn.backgroundColor = [UIColor whiteColor];
    [self.ForwardBtn setImage:[UIImage imageNamed:@"zhuanfa"] forState:UIControlStateNormal];
    [self.ForwardBtn setTitle:@"转发" forState:UIControlStateNormal];
    [self.ForwardBtn setTitleEdgeInsets:UIEdgeInsetsMake(0,0 ,0, -10)];
    self.ForwardBtn.titleLabel.font = [UIFont systemFontOfSize:12];
    [self.ForwardBtn setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
    [self addSubview:self.ForwardBtn];
    
    UIView *line1 = [[UIView alloc]init];
    line1.backgroundColor = [UIColor grayColor];
    [line1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.mas_top).offset(10);
        make.bottom.equalTo(self.mas_bottom).offset(-10);
    }];
    [self addSubview:line1];
    
    
    self.CommentBtn = [[UIButton alloc]initWithFrame:CGRectMake(kScreenWidth/3, 0.5, kScreenWidth/3 - 1, self.size.height)];
    [self.CommentBtn setImage:[UIImage imageNamed:@"pinlun"] forState:UIControlStateNormal];
    [self.CommentBtn setTitle:@"评论" forState:UIControlStateNormal];
    self.CommentBtn.titleLabel.font = [UIFont systemFontOfSize:12];
    [self.CommentBtn setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
    [self.CommentBtn setTitleEdgeInsets:UIEdgeInsetsMake(0,0 ,0, -10)];
    self.CommentBtn.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.CommentBtn];
    
    UIView *line2 = [[UIView alloc]init];
    line2.backgroundColor = [UIColor grayColor];
    [line2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.mas_top).offset(10);
        make.bottom.equalTo(self.mas_bottom).offset(-10);
        make.width.equalTo(@1);
    }];
    [self addSubview:line2];
    
    
    self.AppreciateBtn = [[UIButton alloc]initWithFrame:CGRectMake(kScreenWidth *2/3, 0.5, kScreenWidth/3-1, self.size.height)];
    [self.AppreciateBtn setImage:[UIImage imageNamed:@"dianzan"] forState:UIControlStateNormal];
    [self.AppreciateBtn setImage:[UIImage imageNamed:@"ydianzan"] forState:UIControlStateHighlighted];
    [self.AppreciateBtn setTitle:@"点赞" forState:UIControlStateNormal];
    self.AppreciateBtn.titleLabel.font = [UIFont systemFontOfSize:12];
    [self.AppreciateBtn setTitleEdgeInsets:UIEdgeInsetsMake(0,0 ,0, -10)];
    [self.AppreciateBtn setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
    self.AppreciateBtn.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.AppreciateBtn];
}
@end
